home *** CD-ROM | disk | FTP | other *** search
/ Compendium Deluxe 2 / LSD and 17bit Compendium Deluxe - Volume II.iso / a / prog / asmsrc / meltdown.lha / COUNT / Count.bak next >
Encoding:
Text File  |  1988-07-19  |  6.0 KB  |  264 lines

  1. *****************************************************************************
  2. *                                                                           *
  3. *                 Count Down 9 To 0 For Start Of Demo                 *
  4. *                                                                           *
  5. *  Start Date : 2/3/91                                                      *
  6. * Last Update : 2/3/91                                                      *
  7. *                                  Code : Melt Down *
  8. *                                                                           *
  9. *****************************************************************************
  10.  
  11. ; Include the macros
  12.  
  13.     Incdir    Df1:
  14.     Include    Source/Macro
  15.  
  16. *****************************************************************************
  17.  
  18. ; Dont forget to use chip ram
  19.  
  20.     Chip
  21.     
  22. *****************************************************************************
  23.  
  24. ; Kill the operating system for good mesure
  25.  
  26.     Kill        
  27.     
  28. *****************************************************************************
  29.  
  30. ; Load custom and set up copper list
  31.  
  32.     Lea    Custom,A5
  33.     Move.l    #Copper,Cop1lch(a5)
  34.     
  35. *****************************************************************************
  36.  
  37. ; Clear Some Memory
  38.  
  39.     Blitwait
  40.     Move.l    #$70000,Bltdpth(a5)
  41.     Move.l    #-1,Bltafwm(a5)
  42.     Move.w    #0,Bltdmod(a5)
  43.     Move.l    #$01000000,Bltcon0(a5)
  44.     Move.w    #256*64+60,Bltsize(a5)
  45.  
  46. *****************************************************************************
  47.  
  48.     Blitwait
  49.     
  50. *****************************************************************************
  51.  
  52. ; Main routine here
  53.  
  54. Mouse
  55.     Pos                    ; Get in sync with vbi
  56.     Btst    #7,$bfe001
  57.     Beq.s    Mouse
  58.     Bsr    BlitBlock
  59.     Tst.w    OutFlag
  60.     Bne.s    Quit
  61.     Tstmice    Mouse                ; Pressed the mouse
  62.     
  63. *****************************************************************************
  64.  
  65. ; Return operating system and go back to user
  66.  
  67. Quit
  68.     Heal
  69.     Clr.l    D0                ; No error
  70.     Rts
  71.     
  72. *****************************************************************************
  73.  
  74. ; Blit Block
  75. BlitBlock
  76.     Cmp.w    #25,CountDel            ; Is The Delay > 25
  77.     Bgt    CheckOther            ; No Then Skip
  78.     Tst.w    NumCol+2            ; Is Colour Black
  79.     Beq.s    DoRest                ; Yes ???
  80.     Sub.w    #$111,NumCol+2            ; Fade It
  81.     Bra    DoRest                ; Skip Colour Set
  82. CheckOther
  83.     Move.w    #$fff,NumCol+2            ; Set Colour
  84. DoRest
  85.     Tst.w    CountDel            ; Have We Reaced 0
  86.     Bne    OutAHere            ; Yes ??
  87.     Cmp.w    #800,Count            ; Have We Blited 0
  88.     Bne.s    GoDODO                ; Yes Or No
  89.     Move.w    #-1,OutFlag            ; Go On Quit
  90.     Rts
  91. GoDODO    
  92.  
  93. ; Clear Screen
  94.  
  95.     Blitwait
  96.     Move.l    #$70000,Bltdpth(a5)
  97.     Move.l    #-1,Bltafwm(a5)
  98.     Move.w    #0,Bltdmod(a5)
  99.     Move.l    #$01000000,Bltcon0(a5)
  100.     Move.w    #256*64+60,Bltsize(a5)
  101.     Blitwait
  102.     Move.w    #100,CountDel            ; Set Delay In Frames
  103.     Move.l    #$09f00000,Bltcon0(a5)
  104.     Move.l    #-1,Bltafwm(a5)
  105.     Move.w    #36,Bltdmod(a5)
  106.     Move.w    #00,Bltamod(a5)
  107.     Lea    $70000,A0            ; Screen
  108.     Lea    Nums,A1                ; Pointer To Num Data
  109.     Add.w    Count,A1            ; Get Current Num
  110.     Add.w    #80,Count            ; Inc For Next Char
  111.     Move.w    #8-1,D7                ; 8 On A Line
  112.     Move.w    #32*64+2,D6            ; Siz 
  113. DoDo1
  114.     Move.w    #9,D5                ; 10 Down
  115. DoDo
  116.     Tst.b    (a1)+
  117.     Beq.s    Leave
  118.     Move.l    A0,Bltdpth(a5)
  119.     Move.l    #BlockData,Bltapth(a5)
  120.     Move.w    D6,Bltsize(a5)
  121. Leave
  122.     Add.w    #4,a0
  123.     Dbf    D5,DoDo
  124.     Add.w    #31*40,A0
  125.     Dbf    D7,DODo1
  126. OutAHere
  127.     Sub.w    #1,CountDel
  128.     Rts
  129.     
  130. *****************************************************************************
  131.  
  132. BlockData
  133.     Dc.w    0,0
  134.     Rept    31
  135.     Dc.w    %0111111111111111,%1111111111111111
  136.     Endr
  137.  
  138. *****************************************************************************
  139.  
  140. OutFlag
  141.     Dc.w    0
  142. CountDel
  143.     Dc.w    0
  144. Count
  145.     Dc.w    0
  146.     
  147. *****************************************************************************
  148.  
  149. Nums   
  150.     Dc.b    0,0,1,1,1,1,1,1,0,0
  151.     Dc.b    0,1,1,1,1,1,1,1,1,0
  152.     Dc.b    0,1,1,0,0,0,0,1,1,0
  153.     Dc.b    0,1,1,1,1,1,1,1,1,0
  154.     Dc.b    0,0,1,1,1,1,1,1,1,0
  155.     Dc.b    0,0,0,0,0,0,0,1,1,0
  156.     Dc.b    0,1,1,1,1,1,1,1,1,0
  157.     Dc.b    0,0,1,1,1,1,1,1,0,0
  158.  
  159.     Dc.b    0,0,1,1,1,1,1,1,0,0
  160.     Dc.b    0,1,1,1,1,1,1,1,1,0
  161.     Dc.b    0,1,1,0,0,0,0,1,1,0
  162.     Dc.b    0,1,1,1,1,1,1,1,1,0
  163.     Dc.b    0,1,1,1,1,1,1,1,1,0
  164.     Dc.b    0,1,1,0,0,0,0,1,1,0
  165.     Dc.b    0,1,1,1,1,1,1,1,1,0
  166.     Dc.b    0,0,1,1,1,1,1,1,0,0
  167.  
  168.     Dc.b    0,1,1,1,1,1,1,1,0,0
  169.     Dc.b    0,1,1,1,1,1,1,1,1,0
  170.     Dc.b    0,0,0,0,0,0,0,1,1,0
  171.     Dc.b    0,0,0,0,0,0,0,1,1,0
  172.     Dc.b    0,0,0,0,0,0,0,1,1,0
  173.     Dc.b    0,0,0,0,0,0,0,1,1,0
  174.     Dc.b    0,0,0,0,0,0,0,1,1,0
  175.     Dc.b    0,0,0,0,0,0,0,1,1,0
  176.     
  177.     Dc.b    0,0,1,1,1,1,1,1,0,0
  178.     Dc.b    0,1,1,1,1,1,1,1,1,0
  179.     Dc.b    0,1,1,0,0,0,0,0,0,0
  180.     Dc.b    0,1,1,1,1,1,1,1,1,0
  181.     Dc.b    0,1,1,1,1,1,1,1,1,0
  182.     Dc.b    0,1,1,0,0,0,0,1,1,0
  183.     Dc.b    0,1,1,1,1,1,1,1,1,0
  184.     Dc.b    0,0,1,1,1,1,1,1,0,0
  185.  
  186.     Dc.b    0,0,1,1,1,1,1,1,0,0
  187.     Dc.b    0,1,1,1,1,1,1,1,1,0
  188.     Dc.b    0,1,1,0,0,0,0,0,0,0
  189.     Dc.b    0,1,1,1,1,1,1,1,1,0
  190.     Dc.b    0,1,1,1,1,1,1,1,1,0
  191.     Dc.b    0,0,0,0,0,0,0,1,1,0
  192.     Dc.b    0,1,1,1,1,1,1,1,1,0
  193.     Dc.b    0,0,1,1,1,1,1,1,0,0
  194.  
  195.     Dc.b    0,1,1,0,0,0,0,1,1,0
  196.     Dc.b    0,1,1,0,0,0,0,1,1,0
  197.     Dc.b    0,1,1,0,0,0,0,1,1,0
  198.     Dc.b    0,1,1,1,1,1,1,1,1,0
  199.     Dc.b    0,1,1,1,1,1,1,1,1,0
  200.     Dc.b    0,0,0,0,0,0,0,1,1,0
  201.     Dc.b    0,0,0,0,0,0,0,1,1,0
  202.     Dc.b    0,0,0,0,0,0,0,1,1,0
  203.  
  204.     Dc.b    0,1,1,1,1,1,1,1,0,0
  205.     Dc.b    0,1,1,1,1,1,1,1,1,0
  206.     Dc.b    0,0,0,0,0,0,0,1,1,0
  207.     Dc.b    0,0,0,1,1,1,1,1,1,0
  208.     Dc.b    0,0,0,1,1,1,1,1,1,0
  209.     Dc.b    0,0,0,0,0,0,0,1,1,0
  210.     Dc.b    0,1,1,1,1,1,1,1,1,0
  211.     Dc.b    0,1,1,1,1,1,1,1,0,0
  212.  
  213.     dc.b    0,1,1,1,1,1,1,1,1,0
  214.     dc.b    0,1,1,1,1,1,1,1,1,0
  215.     dc.b    0,0,0,0,0,0,0,1,1,0
  216.     dc.b    0,1,1,1,1,1,1,1,1,0
  217.     dc.b    0,1,1,1,1,1,1,1,1,0
  218.     dc.b    0,1,1,0,0,0,0,0,0,0
  219.     dc.b    0,1,1,1,1,1,1,1,1,0
  220.     dc.b    0,0,1,1,1,1,1,1,1,0
  221.  
  222.     Dc.b    0,0,0,0,1,1,0,0,0,0
  223.     Dc.b    0,0,0,1,1,1,0,0,0,0
  224.     Dc.b    0,0,1,1,1,1,0,0,0,0
  225.     Dc.b    0,0,1,0,1,1,0,0,0,0
  226.     Dc.b    0,0,0,0,1,1,0,0,0,0
  227.     Dc.b    0,0,0,0,1,1,0,0,0,0
  228.     Dc.b    0,1,1,1,1,1,1,1,1,0
  229.     Dc.b    0,1,1,1,1,1,1,1,1,0
  230.  
  231.     Dc.b    0,0,1,1,1,1,1,1,0,0
  232.     Dc.b    0,1,1,1,1,1,1,1,1,0
  233.     Dc.b    0,1,1,0,0,0,1,1,1,0
  234.     Dc.b    0,1,1,0,0,1,0,1,1,0
  235.     Dc.b    0,1,1,0,1,0,0,1,1,0
  236.     Dc.b    0,1,1,1,0,0,0,1,1,0
  237.     Dc.b    0,1,1,1,1,1,1,1,1,0
  238.     Dc.b    0,0,1,1,1,1,1,1,0,0
  239.     
  240. *****************************************************************************
  241.  
  242. ; All copper list after here
  243.  
  244. Copper
  245.  
  246.     Spr_Off                    ; Switch sprites off
  247.     Cmove    $2c71,Diwstrt
  248.     Cmove    $2cc1,Diwstop
  249.     Cmove    $0038,Ddfstrt
  250.     Cmove    $00d0,Ddfstop
  251.     Cmove    $0000,Bpl1mod            
  252.     Cmove    $0000,Bpl2mod
  253.     Cmove    $0007,Bpl1pth
  254.     Cmove    $0000,Bpl1ptl
  255.     Cmove    $0000,Color00
  256. NumCol
  257.     Cmove    $0fff,Color01
  258.     Cmove    $1200,Bplcon0
  259.     Endcop
  260.  
  261. *****************************************************************************
  262.  
  263.  
  264.